import http from "@/api";

// 用户登录
export const loginApi = (params) => {
  return http.post("/v1/token", params);
};

// 获取字符验证码
export const getCodeImgApi = () => {
  return http.get("/auth/code");
};

// 获取租户列表
export const getTenantListApi = () => {
  return http.get("/auth/tenant/list");
};

// 退出登录
export const logoutApi = () => {
  return http.post("/v1/logout");
};

// 获取菜单列表及权限
export const getMenuApi = () => {
  return http.get("/v1/menu");
};

// 获取字符验证码图片类型
export const charVerifyImgApi = () => {
  return http.get("/v1/charVerifyImg");
};

// 图片上传(多图上传必须传{ cancel: false })
export const uploadImg = (params) => {
  return http.post("/v1/upload", params, { cancel: false });
};

// 视频上传
export const uploadVideo = (params) => {
  return http.post("/v1/upload", params, { cancel: false });
};
